import java.util.Scanner;
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86186
 * Date: 2023-09-26
 * Time: 18:28
 */
public class Test {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        String str = in.next();
        int begin = 0, end = 0;
        int max = 0, slow = 0, fast = 0, count = 0;
        while(fast < str.length()) {
            while(fast < str.length() && str.charAt(fast) >= '0' && str.charAt(fast) <= '9') {
                count++;
                fast++;
            }
            if(count > max) {
                max = count;
                begin = slow;
                end = fast;
            }
            count = 0;
            while(fast < str.length() && (str.charAt(fast) < '0' || str.charAt(fast) > '9')) {
                fast++;
            }
            slow = fast;
        }
        System.out.println(str.substring(begin,end));
    }
}
